import Vue from 'vue'
import Router from 'vue-router'
import news from 'page/news/newslist' // 新闻列表
import newsdetail from 'page/news/children/newsdetail' // 新闻详情
import housekeep from 'page/housekeep/keeplist' // 家政服务列表
import keepdetail from 'page/housekeep/children/keepdetail' // 家政服务详情
import wylist from 'page/wy/wylist' // 物业动态列表
import wydetail from 'page/wy/children/wydetail' // 物业动态详情
import houserent from 'page/houserent/rentlist' // 房屋租赁列表
import rentdetail from 'page/houserent/children/rentdetail' // 房屋租赁详情
import member from 'page/member/member' // 用户中心
import exchangeinfo from 'page/member/exchangeinfo' // 修改信息
import myprofile from 'page/myprofile/myprofile' // 个人资料
import bindaccount from 'page/bindaccount/bindaccount' // 账号绑定
import myfee from 'page/myFee/index' // 在线缴费
import feeRecord from 'page/feeRecord/index' // 缴费记录
import myprotectrecord from 'page/myProtectRecord/myprotectrecord' // 我的维护记录
import march from 'page/myProtectRecord/children/march' // 进行中
import over from 'page/myProtectRecord/children/over' // 已结束
import myresource from 'page/myResource/myresource' // 我的资源
import applymaintain from 'page/applyMaintain/applymaintain' // 申请维护
import suggest from 'page/suggest/suggest' // 投诉建议
import hotactive from 'page/hotactive/hotactive' // 小区活动
import hotactivedetail from 'page/hotactive/children/hotactivedetail' // 小区活动详情
import hrlist from 'page/hr/hrlist' // 人员招聘列表
import hrdetail from 'page/hr/children/hrdetail' // 人员招聘详情
import signup from 'page/hotactive/signup' // 报名
import aboutus from 'page/aboutUs/aboutUs' // 关于我们
import main from 'page/main/main' // 关于我们


Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    // 首页
    {
      path: '/index',
      component: main
    },
    // 新闻列表
    {
      path: '/news',
      component: news
    },
    // 新闻详情
    {
      path: '/news/:id',
      component: newsdetail
    },
    // 房屋租赁列表
    {
      path: '/houserent',
      component: houserent
    },
    // 房屋租赁详情
    {
      path: '/houserent/:id',
      component: rentdetail
    },
    // 家政服务列表
    {
      path: '/housekeep',
      component: housekeep
    },
    // 家政服务详情
    {
      path: '/housekeep/:id',
      component: keepdetail
    },
    // 用户中心
    {
      path: '/member',
      component: member
    },
    // 修改信息
    {
      path: '/exchangeinfo',
      component: exchangeinfo
    },
    // 账号绑定
    {
      path: '/bindaccount',
      component: bindaccount
    },
    // 在线缴费
    {
      path: '/myfee',
      component: myfee
    },
    // 缴费记录
    {
      path: '/feerecord',
      component: feeRecord
    },
    // 我的维护记录
    {
      path: '/myprotectrecord',
      component: myprotectrecord,
      children: [{
        path: '',
        component: march
      }, {
        path: 'over',
        component: over
      }]
    },
    // 我的资源
    {
      path: '/myresource',
      component: myresource
    },
    // 我的个人资料
    {
      path: '/myprofile',
      component: myprofile
    },
    // 申请维护
    {
      path: '/applymaintain',
      component: applymaintain
    },
    // 投诉建议
    {
      path: '/suggest',
      component: suggest
    },
    // 热门活动
    {
      path: '/hotactive',
      component: hotactive
    },
    // 热门活动详情
    {
      path: '/hotactive/:id',
      component: hotactivedetail
    },
    // 人员招聘
    {
      path: '/hr',
      component: hrlist
    },
    // 人员招聘详情
    {
      path: '/hr/:id',
      component: hrdetail
    },
    // 报名
    {
      path: '/signup',
      component: signup
    },
    // 关于我们
    {
      path: '/aboutus',
      component: aboutus
    }
  ],
  linkActiveClass: 'active'
})
